import hashlib, uuid
from django.conf import settings

def md5(s):
    hash_object = hashlib.md5(settings.SECRET_KEY.encode('utf-8'))
    hash_object.update(s.encode("utf-8"))

    return hash_object.hexdigest()

def uid(s):
    data = "{}-{}".format(str(uuid.uuid4()), s)

    return md5(data)